<?php

/**
 * model_position
 */

	class Model_position extends YOU {

	public function __construct()
	{
		parent::__construct();
	}

	/** 读取成配置 **/
	public function getIni()
	{
		$position_lists = $this->getAll();
		foreach ($position_lists as $key => $value){
			$position[$value['position_id']] = $value['position_name'];
		}

		return $position;
	}

	/** 读取列表 **/
	public function getAll($field = "*")
	{
		$position_lists = $this->db->fetchAll("SELECT {$field} FROM `tbl_position` ");

		return $position_lists;
	}

	/** 读取信息 **/
	public function getInfo($position_id, $field = "*")
	{
		$data = $this->db->fetchRow("SELECT {$field} FROM `tbl_position` WHERE position_id='{$position_id}' ");

		return $data;
	}

}



?>